﻿#region Copyright(c) 2006 ZO, All right reserved.
// -----------------------------------------------------------------------------
// Copyright(c) 2006 ZO, All right reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
//   1.  Redistribution of source code must retain the above copyright notice,
//       this list of conditions and the following disclaimer.
//   2.  Redistribution in binary form must reproduce the above copyright
//       notice, this list of conditions and the following disclaimer in the
//       documentation and/or other materials provided with the distribution.
//   3.  The name of the author may not be used to endorse or promote products
//       derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// -----------------------------------------------------------------------------
#endregion


#region Using directives

using System.ComponentModel;

#endregion

namespace ZO.SmartCore.Security.Cryptography
{
    /// <summary>
    /// Avaliable Symmetric cryptographic algorithms
    /// </summary>
    public enum SymmetricAlgorithm
    {
        /// <summary>
        ///     Data Encryption Standard (DES)
        ///     <para>
        ///			Designer(s) 	IBM
        ///     </para>
        ///     <para>
        ///			First published 	1975 (January 1977 as the standard)
        ///     </para>
        ///     <para>
        ///			Cipher(s) based on this design 	Triple DES, G-DES, DES-X, LOKI89, ICE
        ///     </para>
        ///     <para>
        ///			Block size(s) 	64 bits
        ///     </para>
        ///     <para>
        ///			Key size(s) 	56 bits
        ///     </para>
        ///     <para>
        ///			Structure 	Feistel network
        ///     </para>
        ///     <para>
        ///			Number of rounds 	16
        ///     </para>
        ///     <para>
        ///			DES is now considered insecure because a brute force attack is possible (see EFF DES cracker). As of 2004, the best analytical attack is linear cryptanalysis, which requires 243 known plaintexts and has a time complexity of 239-43 (Junod, 2001); under a chosen-plaintext assumption, the data complexity can be reduced by a factor of four (Knudsen and Mathiassen, 2000).
        ///     </para>
        /// </summary>
        [Description("System.Security.Cryptography.DESCryptoServiceProvider")]
        DES = 0,

        /// <summary>
        ///     RC2 algorithm 
        /// <para>
        ///		Designer(s) 	Ron Rivest
        /// </para>
        /// <para>
        ///		First published 	source code leaked 1996 (designed 1987)
        /// </para>
        /// <para>
        ///		Block size(s) 	64 bits
        /// </para>
        /// <para>
        ///		Key size(s) 	8–128 bits, in steps of eight bits; default 64 bits
        /// </para>
        /// <para>
        ///		Structure 	Source-heavy Feistel network
        /// </para>
        /// <para>
        ///		Number of rounds 	16 of type MIXING; 2 of type MASHING
        /// </para>
        /// <para>
        ///		A related-key attack is possible requiring 234 chosen plaintexts (Kelsey et al, 1997).
        /// </para>
        /// </summary>
        [Description("System.Security.Cryptography.RC2CryptoServiceProvider")]
        RC2 = 1,

        /// <summary>
        ///     Advanced Encryption Standard (AES) also known as Rijndael
        ///     <para>
        ///			Designer(s) 	Vincent Rijmen and Joan Daemen
        ///     </para>
        ///     <para>
        ///			First published 	1998
        ///     </para>
        ///     <para>
        ///			Derived from 	Square (cipher)
        ///     </para>
        ///     <para>
        ///			Cipher(s) based on this design 	Crypton (cypher), Anubis (cipher), GRAND CRU
        ///     </para>
        ///     <para>
        ///			Block size(s) 	128 bits
        ///     </para>
        ///     <para>
        ///			Key size(s) 	128, 192 or 256 bits
        ///     </para>
        ///     <para>
        ///			Number of rounds 	10, 12 and 14 (for the respective key sizes)
        ///     </para>
        ///     <para>
        ///			A related-key attack can break up to 9 rounds of 256-bit AES. A chosen-plaintext attack can break 8 rounds of 192- and 256-bit AES, and 7 rounds of 128-bit AES. (Ferguson et al, 2000).
        ///     </para>
        /// </summary>
        [Description("System.Security.Cryptography.RijndaelManaged")]
        Rijndael = 2,

        /// <summary>
        ///     Advanced Encryption Standard (AES) also known as Rijndael
        ///     <para>
        ///			Designer(s) 	Vincent Rijmen and Joan Daemen
        ///     </para>
        ///     <para>
        ///			First published 	1998
        ///     </para>
        ///     <para>
        ///			Derived from 	Square (cipher)
        ///     </para>
        ///     <para>
        ///			Cipher(s) based on this design 	Crypton (cypher), Anubis (cipher), GRAND CRU
        ///     </para>
        ///     <para>
        ///			Block size(s) 	128 bits
        ///     </para>
        ///     <para>
        ///			Key size(s) 	128, 192 or 256 bits
        ///     </para>
        ///     <para>
        ///			Number of rounds 	10, 12 and 14 (for the respective key sizes)
        ///     </para>
        ///     <para>
        ///			A related-key attack can break up to 9 rounds of 256-bit AES. A chosen-plaintext attack can break 8 rounds of 192- and 256-bit AES, and 7 rounds of 128-bit AES. (Ferguson et al, 2000).
        ///     </para>
        /// </summary>
        [Description("System.Security.Cryptography.RijndaelManaged")]
        AES = 2,

        /// <summary>
        ///     Triple DES (also 3DES) 
        ///     <para>
        ///			Designer(s) 	IBM
        ///     </para>
        ///     <para>
        ///			First published 	1978
        ///     </para>
        ///     <para>
        ///			Derived from 	DES
        ///     </para>
        ///     <para>
        ///			Block size(s) 	64 bits
        ///     </para>
        ///     <para>
        ///			Key size(s) 	168 bits
        ///     </para>
        ///     <para>
        ///			Structure 	Feistel network
        ///     </para>
        ///     <para>
        ///			Number of rounds 	equivalent of 48 DES rounds
        ///     </para>
        ///     <para>
        ///			Lucks: 232 known plaintexts, 2113 operations including 290 DES encryptions, 288 memory; Biham: find one of 228 target values with a handful of chosen plaintexts per key and 284 encryptions
        ///     </para>
        /// </summary>
        [Description("System.Security.Cryptography.TripleDESCryptoServiceProvider")]
        TripleDES = 3
    }
}
